package org.jeecg.enums;

import lombok.Getter;

@Getter
public enum InstallOrderStatus {

    WAITING("未安装", 0),
    ACCEPTED("已接收", 1),
    INSTALLED("已安装", 2),
    CHECKED("已检测", 3),
    FINISHED("已验收", 4),
    VERIFICATED("已核销", 5),
    PROBLEM("待整改", 6)
    ;

    private final String label;
    private final Integer value;

    InstallOrderStatus(String label, Integer value) {
        this.label = label;
        this.value = value;
    }

    public static InstallOrderStatus of(Integer value) {
        for (InstallOrderStatus type : InstallOrderStatus.values()) {
            if (type.value == value) {
                return type;
            }
        }
        return null;
    }
}
